package com.biz.primus.ms.promotion.dao.po;

import com.biz.primus.model.promotion.vo.OrderPromotionDetailVo;
import com.biz.primus.model.promotion.vo.req.OrderPromotionReqDetailVo;
import java.time.LocalDateTime;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 预售促销
 *
 * @author david-liu
 */
@Getter
@Setter
@Entity
public class PresellPromotion extends BasePromotion {
    private static final long serialVersionUID = 4513773862166067235L;

    /**
     * 发货时间
     */
    private LocalDateTime deliverTime;

    /**
     * 预售商品
     */
    @OneToMany(mappedBy = "presellPromotion")
    private List<PresellProduct> presellProducts;

    @Override
    public boolean isMatchPromotionRule(OrderPromotionReqDetailVo detailVo) {
        return false;
    }

    @Override
    public OrderPromotionDetailVo getOrderPromotionDetail(OrderPromotionReqDetailVo reqDetailVo) {
        return null;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }

}
